package com.project.webservice.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.project.util.JSONUtils;
import com.project.webservice.dto.TbCenterLinkDto;
import com.project.webservice.entity.TbCenterLink;
import com.project.webservice.mapper.TbCenterLinkMapper;
import com.project.webservice.service.TbCenterLinkService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class TbCenterLinkServiceImpl extends ServiceImpl<TbCenterLinkMapper, TbCenterLink> implements TbCenterLinkService {
    /**
     * 数据通信质量报告(一天详细) get_QUALITY_Center_DAY_Detail
     * @param date
     * @return
     */
    public List<TbCenterLinkDto> getQualityCenterDayDetail(String  date){
        log.info("getQualityCenterDayDetail:{}", date);
        return baseMapper.getQualityCenterDayDetail(date);
    }

    /**
     * 数据通信质量报告(多天)get_QUALITY_Center_DAYs
     * @param page
     * @param search
     * @return
     */
    public IPage<TbCenterLinkDto> getQualityCenterDays(Page page, TbCenterLinkDto search){
        log.info("getTidLiv:{}", JSONUtils.writeExcludeNull(search));
        return baseMapper.getQualityCenterDays(page,search);
    }
}
